﻿<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Error</title>
<style>
    html, body {
        background-color: #fff;
        color: #636b6f;
        font-family: 'Raleway', sans-serif;
        font-weight: 100;
        height: 100vh;
        margin: 0;
    }

    .full-height {
        height: 100vh;
    }

    .flex-center {
        align-items: center;
        display: flex;
        justify-content: center;
    }

    .position-ref {
        position: relative;
    }

    .content {
        text-align: center;
    }

    .title {
        font-size: 36px;
        padding: 20px;
    }
</style>
</head>
<body>
    <div class="flex-center position-ref full-height">
        <div class="content">
            <div class="title">{empty name="content"}Whoops, looks like something went wrong.{else /}{$content|raw}{/empty}</div>
            <span>5</span> 秒后返回上一页
        </div>
    </div>
    <script>
        const time = 5;
        const interval = setInterval(function(){
            time--;
            if(time <= 0){
                clearInterval(interval);
                history.back();
            }
            document.querySelector('span').innerHTML = time;
        }, 1000);
        setTimeout(function () {
            window.history.back(-1);
        }, 5000)
    </script>
</body>
</html>
